Optimal. Leaf size=66 \[ \frac{\cos ^3(c+d x)}{3 a^2 d}-\frac{\cos ^2(c+d x)}{a^2 d}+\frac{2 \cos (c+d x)}{a^2 d}-\frac{2 \log (\cos (c+d x)+1)}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.163219, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3872, 2836, 12, 77} \[ \frac{\cos ^3(c+d x)}{3 a^2 d}-\frac{\cos ^2(c+d x)}{a^2 d}+\frac{2 \cos (c+d x)}{a^2 d}-\frac{2 \log (\cos (c+d x)+1)}{a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2836
Rule 12
Rule 77
Rubi steps
\begin{align*} \int \frac{\sin ^3(c+d x)}{(a+a \sec (c+d x))^2} \, dx &=\int \frac{\cos ^2(c+d x) \sin ^3(c+d x)}{(-a-a \cos (c+d x))^2} \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{(-a-x) x^2}{a^2 (-a+x)} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(-a-x) x^2}{-a+x} \, dx,x,-a \cos (c+d x)\right )}{a^5 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (-2 a^2+\frac{2 a^3}{a-x}-2 a x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^5 d}\\ &=\frac{2 \cos (c+d x)}{a^2 d}-\frac{\cos ^2(c+d x)}{a^2 d}+\frac{\cos ^3(c+d x)}{3 a^2 d}-\frac{2 \log (1+\cos (c+d x))}{a^2 d}\\ \end{align*}
Mathematica [A] time = 0.205094, size = 51, normalized size = 0.77 \[ \frac{27 \cos (c+d x)-6 \cos (2 (c+d x))+\cos (3 (c+d x))-48 \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )-22}{12 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.083, size = 82, normalized size = 1.2 \begin{align*} -2\,{\frac{\ln \left ( 1+\sec \left ( dx+c \right ) \right ) }{d{a}^{2}}}+{\frac{1}{3\,d{a}^{2} \left ( \sec \left ( dx+c \right ) \right ) ^{3}}}-{\frac{1}{d{a}^{2} \left ( \sec \left ( dx+c \right ) \right ) ^{2}}}+2\,{\frac{1}{d{a}^{2}\sec \left ( dx+c \right ) }}+2\,{\frac{\ln \left ( \sec \left ( dx+c \right ) \right ) }{d{a}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00854, size = 69, normalized size = 1.05 \begin{align*} \frac{\frac{\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )^{2} + 6 \, \cos \left (d x + c\right )}{a^{2}} - \frac{6 \, \log \left (\cos \left (d x + c\right ) + 1\right )}{a^{2}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.75959, size = 132, normalized size = 2. \begin{align*} \frac{\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )^{2} + 6 \, \cos \left (d x + c\right ) - 6 \, \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{3 \, a^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.32994, size = 101, normalized size = 1.53 \begin{align*} -\frac{2 \, \log \left ({\left | -\cos \left (d x + c\right ) - 1 \right |}\right )}{a^{2} d} + \frac{a^{4} d^{2} \cos \left (d x + c\right )^{3} - 3 \, a^{4} d^{2} \cos \left (d x + c\right )^{2} + 6 \, a^{4} d^{2} \cos \left (d x + c\right )}{3 \, a^{6} d^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]